/***********************************************************
* 
*     File Name:  string.cpp
* 
*        Author:  Algolc
* 
*          mail:  17360224@qq.com
* 
*  Created Time:  Fri 06 Jul 2018 06:11:45 PM CST
* 
***********************************************************/

#include <stdlib.h>
#include <iostream>
#include <cstring>
int main() {
    using namespace std;
    const int size = 15;
    char name_1[size];
    char name_2[size] = "C++ owBoy!";

    cout << "hi, man. i'm " << name_2 << " what's up?\n";
    cin >> name_1;
    cout << "man, i'm " << name_1 << "\n";
    cout << strlen(name_1) << " " << name_1 << " is my name lenght\n";
    cout << sizeof(name_1) << " is also name lenght\n";
    cout << "your first char is[" << name_1[0] << "]\n";

    name_2[3] = '\0';
    cout << "now name_2 is " << name_2 << " \n";
    return 0;
}
